package org.cainiao.servlet.concurrent.service;

import io.swagger.v3.oas.annotations.servers.Server;
import lombok.RequiredArgsConstructor;
import org.cainiao.servlet.concurrent.util.lock.RedisDistributedLock;

@Server
@RequiredArgsConstructor
public class TestService {

    private final RedisDistributedLock lock;

    /**
     * 假设 err() 方法存在 bug
     * 在没有调用 lock.lock() 的情况下调用了 lock.unlock()
     */
    public void err() {
        lock.unlock("od1", "");
    }
}
